package org.aplombh.java.awcing.basic.basics.doublePointer;

import java.util.Scanner;

public class SplitStringByBlackSpace {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();


        for (int i = 0, j; i < str.length(); i++) {
            j = i;
            while (j < str.length() && str.charAt(j) != ' ') j++;
            System.out.println(str.substring(i, j));
            i = j;
        }
    }
}
